* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --root-bg-color: rgba(1, 2, 3, 0.6);
    --aside-color: rgba(54,69,79, 1);
    --bg-color: rgba(85, 85, 85, 0.8);
    --faded-blue: rgba(0, 170, 255, 0.75);

    background: var(--root-bg-color);
    height: 100%;
    width: 100%;
}

body{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    width: 100%;
    background: var(--root-bg-color);
    overflow: hidden;
}

.main{
    height: 700px;
    width: 700px;
    min-height: 700px;
    min-width: 700px;

    background: gray;
    position: relative;
}

.result{
    position: absolute;
    top: 50%;
    left: 50%;
    height: 50%;
    width: 50%;
    background: radial-gradient(transparent, #000);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1s ease-in-out;
    transform: translate(-50%, -50%) rotateX(90deg);
}

.result p{
    color: white;
    font-size: 4rem;
    z-index: 101;
}

.main::before,
aside::before{
    position: absolute;
    top: -1%;
    left: -1%;
    right: -1%;
    bottom: -1%;
    background: linear-gradient(90deg, red, orange, yellow, green, violet, blue, indigo, indigo, blue, violet, green, yellow, orange, red);
    background-size: 400%;
    content: "";
    filter: blur(5px);
    animation: boardAnimation 60s forwards linear infinite;
    z-index: -1;
}

@keyframes boardAnimation {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.sidebar{
    height: 700px;
    width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

aside{
    height: 500px;
    width: 300px;
    background: var(--aside-color);
    position: relative;
}

.btn{
    font-size: 3rem;
    padding: 0.3em 0.3em;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 70px;
    width: 100%;
    justify-content: center;
    align-items: center;
    background: var(--bg-color);
    position: relative;
}

.btn span{
    display: block;
    transition: transform 1s ease-in-out;
    transform: translateY(50%);
}

.btn:hover span{
    display: block;
    transition: transform 1s ease-in-out;
    transform: translateY(-50%);
}

.btn::before{
    pointer-events: none;
    position: absolute;
    content: "";
    height: 350px;
    width: 350px;
    bottom: 100%;
    background: var(--faded-blue);
    transition: transform 1s ease-in-out;
    border-radius: 50%;
}

.btn:hover::before{
    transition: transform 1s ease-in-out;
    transform: translateY(50%);
}

svg line:nth-child(1) {
    stroke-dasharray: 200;
    stroke-dashoffset: 0;
    animation: line 0.8s forwards ease-in-out;
}

svg line:nth-child(2) {
    opacity: 0;
    stroke-dasharray: 200;
    stroke-dashoffset: 0;
    animation: line 0.8s forwards ease-in-out;
    animation-delay: 0.8s;
}

@keyframes line {
    from {
        opacity: 1;
        stroke-dashoffset: 200;
    }

    to {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

svg circle{
    transform: rotate(90deg) scaleX(-1);
    transform-origin: center;
    stroke-dasharray: 450;
    stroke-dashoffset: 0;
    animation: dash 1s linear;
}

@keyframes dash {
    from {
        stroke-dashoffset: 450;
    }

    to {
        stroke-dashoffset: 0;
    }
}

game-square:empty:hover{
    background: rgba(85, 85, 85, 0.5) !important;
}

.upper-header{
    position: absolute;
    display: block;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    width: 100%;
}

.lower-header{
    position: absolute;
    display: block;
    top: 50%;
    left: 0;
    right: 0;
    height: 20%;
    width: 100%;
}

.upper{
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    bottom: 60%;
    display: flex;
    flex-direction: row;
}

.left{
    display: inline-block;
    margin-top: 5%;
    height: 100%;
    width: 50%;
    border-right: 0.5px solid black;
}

.right{
    margin-top: 5%;
    display: inline-block;
    height: 100%;
    width: 50%;
    border-left: 0.5px solid black;
}

.lower{
    position: absolute;
    top: 70%;
    left: 0;
    right: 0;
    bottom: 5%;
    display: flex;
    flex-direction: row;
}

#choice-ai-svg:hover rect:nth-child(1),
#choice-pvp-svg:hover rect:nth-child(1),
#choice-ai-svg:focus rect:nth-child(1),
#choice-pvp-svg:focus rect:nth-child(1){
    fill: #555555 !important;
}

#choice-x svg line,
#choice-o svg circle{
    animation: none !important;
}

#choice-x svg line:nth-child(2){
    opacity: 1 !important;
}

#choice-x{
    transform: scale(1.4);
}

#choice-x:hover,
#choice-o:hover{
    transform: scale(1.25);
}
